package com.wzq.permission.center.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wzq.permission.client.model.Pager;
import com.wzq.permission.client.model.admin.UserOrganizeModel;

/**
 * UserOrganize Mapper
 * @author Administrator
 *
 */
public interface UserOrganizeMapper extends BaseMapper {
	
	/**
	 * 批量插入记录
	 * @param list
	 * @return
	 */
	int addBatch(List<UserOrganizeModel> list);
	
	/**
	 * 获取组织下的机构
	 * @param id
	 * @return
	 */
	UserOrganizeModel queryUserOrgById(Object id);
	
	/**
	 * 查询组织下所有用户
	 * @param userOrganize
	 * @param pager
	 * @return
	 */
	List<UserOrganizeModel> queryUserOrgList(@Param("model")UserOrganizeModel model, @Param("pager")Pager pager);
	
	/**
	 * 清空组织下所有用户
	 */
	void deleteByOrgId(Object organizeId);
	
	/**
	 * 根据id删除记录
	 * @param userOrganizeIds
	 */
	void deleteUser(@Param("userOrganizeIds")Long[] userOrganizeIds);
	
	/**
	 * 根据userId删除记录
	 * @param organizeId
	 */
	void deleteUserOrgByUserId(Object userId);
	
}
